package oceanlife;
import java.awt.geom.Line2D;


public class AgentDirectionGraphic extends Line2D.Double {
	AgentDirectionGraphic(double xCoord, double yCoord, double speed, double direction){
		update(xCoord,yCoord,speed,direction);
	}
	
	public void update(double xCoord, double yCoord, double speed, double direction){
		float scale = OLSet.getFloat("scale");
		this.x1 = xCoord * scale;
		this.y1 = yCoord * scale;
		this.x2 = xCoord * scale - speed * Math.sin(direction);
		this.y2 = yCoord * scale - speed * Math.cos(direction);
	}

}
